package com.yang.studentsapp;

import com.yang.studentsapp.model.IActionSuccess;
import com.yang.studentsapp.model.SettingModeGrid;
import com.yang.studentsapp.presenter.IView;
import com.yang.studentsapp.presenter.IViewSuccess;

import java.util.List;

/**
 * Created by ${Ян-Вэнь-Чао} on 2016/10/13.
 */
public class PresenterCampus extends PresenterBase {
    private SettingModeGrid mModeCampus;
    public PresenterCampus(IView IView) {
        super(IView);
        mModeCampus = new SettingModeGrid(new MyAction());
    }
//    public void getSchoolSliders(final IViewSuccess<List<SchoolBanner>> success) {
//
//        mModeCampus.getBanners(new IActionSuccess<List<SchoolBanner>>() {
//            @Override
//            public void success(List<SchoolBanner> data) {
//                success.OnSuccess(data);
//            }
//        });
//    }


    public void getSchoolNews(final IViewSuccess<List<Grid>> success){
        mModeCampus.getNews(new IActionSuccess<List<Grid>>() {
            @Override
            public void succes(List<Grid> data) {
                success.onSuccess(data);
            }
        });

    }

}
